﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HelloLLLLL.Blog.Models;
using HelloLLLLL.Blog.DAL;
namespace HelloLLLLL.Blog.Admin.page
{
    public partial class LLComment : System.Web.UI.Page
    {
        public int PageCount = 0;
        DBHelper helper = new DBHelper();
        protected void Page_Load(object sender, EventArgs e)
        {
            string action = Request.QueryString["action"];

            if ("delete" == action)
            {
                DeleteComment(Request.QueryString["id"]);
            }
            PageCount = Convert.ToInt32(helper.GetScalar("select count(1) from Pinglun", null));
           

        }
        private void DeleteComment(string i)
        {
            int id = int.Parse(i);
            if (id > 0)
            {
                helper.GetNonQuery("delete from pinglun where id=" + id);
            }
        }

    }
}